package com.service;

import com.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService {
    @Autowired
    private OrderMapper orderMapper;

    public boolean insertOrder(Long UserId, Long GroupId, Integer Price, boolean Status){
        return orderMapper.insertOrder(UserId,GroupId,Price,Status);
    }

    public Long getNextIndex(){
        return orderMapper.getCurrentIndex()+1;
    }

    public Long getCurrentIndex(){
        return orderMapper.getCurrentIndex();
    }

}
